package com.gxp.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.gxp.mapper.UserMapper;
import com.gxp.pojo.User;
import com.gxp.service.LoginService;

@Service
@Transactional
public class LoginServiceImpl implements LoginService {

	@Autowired
	private UserMapper userMapper;

	@Override
	public boolean Login(User user) {
		User dbUser = userMapper.findById(user);
		if (dbUser != null && user.getPassword().equals(dbUser.getPassword())) {
			return true;
		}
		
		return false;
	}



	@Override
	public void LoginOut(User user) {
		// TODO Auto-generated method stub
		
	}
	
}
